<h1><%= @source.name %></h1>

<h2>Playlists</h2>
<table>
<% @source.playlists.each_with_index do |playlist, index| %>
  <tr onclick="location.href='<%= source_playlist_path(params[:id], index) %>'">
    <% if playlist.name == "Party Shuffle" %>
    <td><%= playlist.name %></td>
    <% else %>
    <td><%= link_to playlist.name, source_playlist_path(params[:id], index) %></td>
    <% end %>
    <td><%= playlist.time%></td>
  </tr>
<% end %>
</table>
